package com.glela.packet.enums;

public enum RedPacketShareTypeEnum {

  LIMIT_TYPE(0, "限时分享"),
  FOREVER_TYPE(1, "永久分享");

  private int type;

  private String desc;

  RedPacketShareTypeEnum(int type, String desc) {
    this.type = type;
    this.desc = desc;
  }

  public static RedPacketShareTypeEnum getByType(int type) {
    for (RedPacketShareTypeEnum typeEnum : RedPacketShareTypeEnum.values()) {
      if (typeEnum.getType() == type) {
        return typeEnum;
      }
    }
    return null;
  }

  public int getType() {
    return type;
  }

  public void setType(int type) {
    this.type = type;
  }

  public String getDesc() {
    return desc;
  }

  public void setDesc(String desc) {
    this.desc = desc;
  }
}
